import time

from app.modules.apps.container_tomcat import TomcatMultiWarApp, TomcatApp, TomcatScApp
from app.modules.common import network

tomcat = TomcatApp(app_id='euaws:ups2',
                   app_name='ups2',
                   zone_home_path='/usr/local/app/uc.euaws.area',
                   zone_alias='euaws',
                   port='23180',
                   nas_app_package_path='',
                   )
tomcat.stop()
tomcat.uninstall_app()
tomcat.install_app()
tomcat.restart()
print tomcat.is_started()

time.sleep(3)
print tomcat.is_started()
time.sleep(3)
#tomcat.stop()
print tomcat.is_started()
